import request from "../utils/request";

export const getClazzList = (cno) => {
  return request({
    url: "/system/clazz/getClazzList",
    params: {
      cno,
    },
  });
};

export const modifiedClazz = (clazzDto) => {
  return request({
    url: "/system/clazz/modified",
    method: "post",
    data: clazzDto,
  });
};

export const deleteClazz = (id) => {
  return request({
    url: "/system/clazz/delete",
    method: "GET",
    params: {
      id,
    },
  });
};

export const joinClazz = (invitationCode, sno) => {
  return request({
    url: "/system/clazz/joinClazz",
    method: "POST",
    params: {
        invitationCode:invitationCode,
        sno:sno
    },
  });
};

export const getStudentList = (clazzId) => {
  return request({
    url: "/system/clazz/getStudentList",
    method: "GET",
    params: {
      clazzId
    },
  });
};
